/*
date:20210303 pm23:05
key:每轮循环在头处添加，并删除尾部一个。
*/
#include <bitset>  
#include<iostream>
#include<sstream>
#include<stdlib.h>
using namespace std;
long hex_int(string s, int base)
{
	//string转成字符数组
	char* s1 = new char[s.size()];
	for (int i = 0; i < s.size(); i++)
	{
		s1[i] = s[i];

	}
	char* s2;
	//以base为底的数字以字符数组输入，得到10进制对应数字
	return strtol(s1, &s2, base);
}

int main()
{

	/*cout << "35的10进制" << std::dec << 35 << endl;
	cout << "35的16进制:" << std::hex << 35 << endl;
	cout << "35的2进制: " << bitset<8>(35) << endl;*/
	int i, n, j, y,t,k,r,m;
	long int p;
	cin >> m>>n;
	string s="";
	int a = -10000;
	int b = 10000;
	int c = 0;
	int A = 65;
	for (i = 0; i < n; i++)
	{
		s=s+char(A + i);
	}
	string s1=s;
	for (j = 0; j < m; j++)
	{
		if (j == 0)
		{
			cout << s;
			}
		else
		{
			s1 = s[j] + s1;
			s1.erase(s1.size()-1);
			cout <<  s1;
		}
		
			cout << "\n";
	}



}
